#ifndef __HERO_VIEW_H__
#define __HERO_VIEW_H__

#include "gofgame/common/ui/ScrollContainer.h"
#include "gofgame/common/ui/Image.h"
#include "gofgame/common/ui/Label.h"
#include "gofgame/common/Ref.h"
#include "gofgame/common/Iterator.h"
#include "gofgame/dungeonkeeper/game/Hero.h"
#include "gofgame/dungeonkeeper/ui/SkillElementView.h"
#include "gofgame/dungeonkeeper/game/skill/SkillManager.h"
#include "gofgame/common/resource/TextureResource.h"

using namespace gofgame::dungeonkeeper::game::skill;

#include <vector>

namespace gofgame {
	namespace dungeonkeeper {
		namespace ui {

			using namespace gofgame::common::ui;
			using namespace gofgame::common;
			using namespace gofgame::dungeonkeeper::game;
			using namespace gofgame::common::resource;
			using namespace std;

			class HeroView : public ScrollContainer {
			public:
				HeroView();
				virtual bool init() _override;

				virtual void setHeroViewInfo(HeroViewInfo hvi);

				/*
				 * Fuck STL!!!! 
				 * I have to write these three methods
				 * actually, I want 
				 * void setDataSource(const collection<SkillElementViewInfo> &vevis);
				 */
				void setDataSource(const set<SkillElementViewInfo> &sevis);
				void setDataSource(const vector<SkillElementViewInfo> &sevis);
				void setDataSource(const list<SkillElementViewInfo> &sevis);

				virtual void setDataSource(Ref<Iterator<SkillElementViewInfo>> iterator);

			protected:
				Ref<Image> headImage;
				Ref<Label> hitPointLabel;
				Ref<Label> maxHitPointLabel;
				Ref<Label> attackLabel;
				Ref<Label> defLabel;
				Ref<Label> attackSpeedLabel;
				Ref<Container> skillContainer;

			private:
				static TextureResource hpIconResource;
				static TextureResource attackIconResource;
				static TextureResource defIconResource;
				static TextureResource attackSpeedIconResource;
			};
		}
	}
}

#endif //__HERO_VIEW_H__
